package com.yimingkeji.mybatis.rest;

import com.yimingkeji.mybatis.entity.User;
import com.yimingkeji.mybatis.mapper2.UserMapper2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Describe:
 * @Auther: zhenlong.yang
 * @Date: 2018/12/14 13:27
 */
@RestController
public class UserController2 {

    @Autowired private UserMapper2 userMapper2;

    @GetMapping("user2")
    public List<User> list(){
        return userMapper2.findAll();
    }
}
